<template>
  <require from="./pool-blocks/pool-blocks"></require>
  <require from="./pool-payments/pool-payments"></require>
  <require from="./miner-stats/miner-stats"></require>
  <require from="./pool-stats/pool-stats"></require>


  <div class="row">
    <div class="col s12 m12 l6 row">
      <div class="card-panel row hoverable m-no-padding">
        <md-input md-label="Check Your Miner Wallet" md-value.bind="minerNew" class="col s12 m10"></md-input>
        <a route-href="route.bind:'pool'; params.bind:{id: id, miner: minerNew}" class="col s12 m2" style="margin-top:20px">
          <button md-button="flat:bind;" if.bind="minerNew">Check</button>
        </a>

        <miner-stats if.bind="miner" id.bind="id" address.bind="miner" class="col s12 m12"></miner-stats>
        </md-card>


        <pool-stats id.bind="id"></pool-stats>
      </div>
    </div>
    <div class="col s12 m12 l6 row">
      <div class="card-panel hoverable m-no-padding" if.bind="data">
        <ul md-tabs="fixed: true;" class="z-depth-1">
          <li md-waves="color: primary;">
            <a href="#poolInfo">Info</a>
          </li>
          <li md-waves="color: primary;" if.bind="data.coin.type ==='STAK'">
            <a href="#gettingStarted">guide</a>
          </li>
          <li md-waves="color: primary;">
            <a href="#topminers">Top miners</a>
          </li>
        </ul>

        <pool-info pool.bind="data" id="poolInfo" class="tab-content"></pool-info>
        <div id="gettingStarted" class="tab-content" if.bind="data.coin.type ==='STAK'">
          <ul class="collection">
            <li class="collection-item">
              Algorithm: Lyra2Rev2
            </li>
            <li class="collection-item">
              Nvidia Mining
              <ul>
                <li>
                  <a href="http://cryptovore.com/2017/11/25/straks-how-to-mine-nvidia-gpu/" target="_blank">Cryptovore's Nvidia Gpu Mining Guide </a>
                </li>
                <li> Download ccminer from
                  <a href="https://github.com/tpruvot/ccminer/releases" target="_blank">here</a>
                </li>
                <li>
                  <code>ccminer-x64-75 -a lyra2v2 -o stratum+tcp://gozopool.com:4500 -u SP5BMTez7GyCzn1AmtdkpkwrsNJsnqukf8</code>
                </li>
              </ul>
            </li>
            <li class="collection-item">
              AMD Mining
              <ul>
                <li>
                  Download mkxminer 3.0 from
                  <a href="https://ufile.io/2qxjh" target="_blank">here</a> or
                  <a href="https://filebin.net/vpcamn8hmh5i16sm/mkxminer201.zip" target="_blank">here</a>
                </li>
                <li>
                  <code>mkxminer.exe --exitsick --asm -o stratum+tcp://gozopool.com:4500 -u SP5BMTez7GyCzn1AmtdkpkwrsNJsnqukf8 -p x -I 23</code>
                </li>
              </ul>
            </li>
          </ul>

        </div>

        <div id="topminers" class="tab-content" >
          <ul class="collection">
            <li class="collection-item" repeat.for="topMiner of data.topMiners">
             <b>${topMiner.miner} </b>
             <div class="secondary-content">${HashCalculatorService.formatHashRate(topMiner.hashrate * 2)} with ${topMiner.sharesPerSecond} sps</div>
            </li>
            
          </ul>

        </div>
      </div>
    </div>
    <div class="col s12">
      <div class="card-panel m-no-padding hoverable">
        <ul md-tabs="fixed: true;" class="z-depth-1">
          <li md-waves="color: primary;">
            <a href="#blocksTab">Blocks</a>
          </li>
          <li md-waves="color: primary;">
            <a href="#paymentsTab">Payments</a>
          </li>
        </ul>

        <pool-blocks pool-id.bind="id" id="blocksTab" class="tab-content z-depth-1"></pool-blocks>
        <pool-payments pool-id.bind="id" id="paymentsTab" class="tab-content z-depth-1"></pool-payments>
      </div>
    </div>
  </div>
</template>
